<!DOCTYPE html>
<head>
    <title>wpp-run</title>
</head>
<style>
    body{
        margin-top: unset;
        margin-left: unset;
        background-color: rgba(0,0,0,0);
        overflow: hidden;
    }
    .wpp_iframe{
        width: 100vw;
        height: 100vh;
        border: none;
        overflow: hidden;
    }
    .plug_box{
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0px;
        left: 0px;
        overflow: hidden;
    }
    .test{
        width: 200px;
        height: 200px;
        background-color: white;
        border-radius: 20px;

    }
</style>
<iframe class="wpp_iframe" id="wpp" src="./backgroud.html"></iframe>
<div class="plug_box" id="plug_box">
    
</div>
<script>
    wpp=document.getElementById("wpp")
    async function reload_wpp(){
        wpp.contentWindow.location.reload();
    }
    async function change_href(url){
        wpp.contentWindow.location.href = url
    }
    async function set_script(script){
        new_script = document.createElement("script")
        new_script.src = script
        document.body.appendChild(new_script)
    }
    window.addEventListener('pywebviewready',async function() {
        window.plugAPI={
            readData:async function(pid){
                return await window.pywebview.api.plug_readData(pid)
            },
            dumpData:async function(pid,data){
                return await window.pywebview.api.plug_dumpData(pid,data)
            }
        }
        set_script("./plug/date.push.js")
        window.get_screen_inf=async function(){
            return  window.pywebview.api.get_screen()
        }
    })
</script>